import Vue from 'vue'
import Router from 'vue-router'
import Main from './views/Main.vue'
import Ios from './views/Ios.vue'
import Details from './views/Details.vue'
import Login from './views/Login.vue'
import Empty from './views/Empty.vue'



import Android from './views/Android.vue'


Vue.use(Router)

export default new Router({
  //去掉url中的#
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',      
      redirect: 'login',     
    },
    {
      path: '/main',
      name: 'main',
      component: Main,
      children: [
        {
          path: 'ios',
          name: 'Ios',
          component: Ios
        },
        {
          path: 'android',
          name: 'Android',
          component: Android
        },
        {
          path: 'details',
          name: 'Details',
          component: Details
        },
        
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/empty',
      name: 'Empty',
      component: Empty
    },
    
    
  ]
})
